#ifndef __QUE_CPU_DIS_AMP_H__
#define __QUE_CPU_DIS_AMP_H__

#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>

#include "mcu_ver_sect.h"
#include "que_struct_type.h"

typedef struct 
{
	uint8_t highDist:6;  //bit 0~5
	uint8_t flag:2;  //bit 1
}__attribute__((__packed__)) defProbeFlagDist;

typedef union
{
  defProbeFlagDist bits;
  uint8_t byte;
}__attribute__((__packed__)) unProbeFlagDist;

typedef struct 
{
    uint8_t hour;
    uint8_t min;
    uint8_t sec;
}__attribute__((__packed__)) defProbeTm;

typedef struct 
{
	uint8_t parkReq:4;  //bit 0 ~3
	uint8_t parkEep:4;  //bit 4~7
}__attribute__((__packed__)) defDevParkStatus;

typedef struct 
{
    uint8_t head88;
    uint8_t head99;
    uint8_t seqno;   //package sequence number
    uint8_t groupnum;   // number of group of laser
    defCpuDisAmp dis_amp[defFrameCpuDisAmp];
    defProbeTm tm;
    uint8_t lowpower;
    uint8_t highpower;
    //defDevPartBits partbits;
    defDevParkStatus parkStatus; 
    //uint8_t mcuver;
	unMcuAppVer m_nMcuVerSect;
    uint8_t u8crc;
}__attribute__((__packed__)) defCpuProtoData;


//defTypeQue* get_que_pt_cpu_dis_amp(void);

//int getRtcMaxCount(void);
void cpu_dis_amp_init( void );
bool cpu_dis_amp_push_back( defCpuDisAmp* dis_amp );
bool cpu_dis_amp_pop_front( defCpuDisAmp* dis_amp );
bool cpu_dis_amp_get_index( int index, defCpuDisAmp* dis_amp );
int cpu_dis_amp_length( void );

#endif

